package com.sky.mapper;


import com.sky.entity.OrderDetail;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDetailMapper {

    /**
     * 新增订单详情
     * @param orderDetailList
     */
    void insertBatch(List<OrderDetail> orderDetailList);

    /***
     * 根据订单id查询订单详情
     * @param id
     * @return
     */
    @Select("SELECT * from order_detail where order_id=#{id}")
    List<OrderDetail> getorderDetailByOrderId(Long id);
}
